//
//  AFNetworkingTool.m
//  af
//
//  Created by dllo on 15/4/21.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "AFNetworkingTool.h"
#import "AFNetworking.h"
@implementation AFNetworkingTool



+(void)NetWorkingTooStr:(NSString *)strURL block:(Block)myBlock
{
   
    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
   
    NSDictionary *params = [[NSDictionary alloc]init];
    
    [manager GET:strURL parameters:params success:
     
     ^(AFHTTPRequestOperation *operation, id responseObject) {
         
       
         NSData *data = [strURL dataUsingEncoding:NSUTF8StringEncoding];
         data = operation.responseData;
       
         id result = [NSJSONSerialization  JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
         
         myBlock(result);
         
     }
     
         failure:^(AFHTTPRequestOperation *operation, NSError *error) {
             
             
             
         }];
    
    
    






}

     

@end
